/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package recommender.objects;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 *
 * @author Aya
 */
@Entity
public class Parent implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name="id")
    private int id;
    @Column(name="prob")
    private double probability;
    @Id
    @Column(name="is_class")
    private boolean isClass;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getProbability() {
        return probability;
    }

    public void setProbability(double probability) {
        this.probability = probability;
    }

    public boolean isClass() {
        return isClass;
    }

    public void setClass(boolean is_class) {
        this.isClass = is_class;
    }
    
    public String getIdentifier(){
        return (isClass?"Class":"Instance")+id;
    }
}
